package test;

/**
 * @author oldliu
 * @since 1.0
 */
public class RepeatNumber {
    public static void main(String[] args) {
        int[] ar = {8, 4, 14, 22, 23, 76, 25,22, 3, 19};
        boolean repeat=false;
        cat:for(int i=0;i<ar.length-1;i++){
            System.out.println("循环了"+(i+1)+"轮");
            for(int j=i+1;j<ar.length;j++){
                if(ar[i]==ar[j]){
                    System.out.println("在第"+(i+1)+"轮，找到了重复。。。"+ar[i]);
                    repeat=true;
                    break cat;
                }
            }
        }
        if(repeat){
            System.out.println("有重复");
        }else{
            System.out.println("没有重复！");
        }
    }
}
